package com.example.micro.netty.server.tcpsticky;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;

/**
 * tcp粘包拆包 server-pipeline
 *
 * @author Code Farmer
 * @create 2021/3/7 7:06 下午
 */
public class MyTcpStickyServerInitializer extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {

        ChannelPipeline channelPipeline = socketChannel.pipeline();
        channelPipeline.addLast(new MyTcpStickyServerHandler());

    }

}
